package core.toolbox.Int;

import java.util.LinkedHashSet;
import java.util.Set;

/**
 * Created by Administrator on 2017/3/20.
 */
public class IntUtils {

    public static int getSum(int[] ints){
        int sum = 0;
        for(int i : ints){
            sum += i;
        }
        return sum;
    }

    public static Integer[] removeDuplicates(int ...args){
        Set set = new LinkedHashSet();
        for (int id : args)
            set.add(id);
        return (Integer[])set.toArray(new Integer[set.size()]);
    }

}
